package com.dbkj.common.interceptor;


import com.dbkj.common.exception.ApiException;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

/**
 * @Author: Max
 * @Date: 2019/10/29 16:33
 */

public class ApiInterceptor implements Interceptor {

    @Override
    public void intercept(Invocation invocation) {
        try{
            invocation.invoke();
        }catch(Exception e){
            e.printStackTrace();
            invocation.getController().renderError(500);
        }
    }
}
